#include <REGX52.H>

/*
	发送方执行程序
*/
unsigned char tmp,i=0;
unsigned int send[] ={1,2,3,4,5,6,7,8};
void URAT_init()
{
	SCON = 0x50;
	TMOD = 0x20;
	TH1 = 0xfd;
	TL1 = 0xfd;
	TR1 = 1;
//	TI = 0;
	EA = 1;
	ES = 1;
	
}
void Timer1_Server() interrupt 4 //定义服务函数
{
		for(i=0;i<8;i++)
		{
			SBUF = send[i++];
			while(TI == 0);
			TI = 0;
		}
}


void main()
{
	URAT_init();
	while(1)
	{
		
	}
}

